import { axios } from "../../utils/request";

const api = {
    pageList: "/work/summary/pageList",
    save: "/work/summary/save",
    delete: "/work/summary/delete",
    submitWorkSummary: "/work/summary/submitWorkSummary",
    readWorkSummary: "/work/summary/readWorkSummary",
};

/**
 * 列表
 */
export function pageList(parameter) {
  return axios({
    url: api.pageList,
    method: "get",
    params: parameter
  });
}

/**
 * 保存
 */
export function save(parameter) {
  return axios({
    url: api.save,
    method: "post",
    data: parameter
  });
}

/**
 * 删除
 */
export function deleteSummary(parameter) {
  return axios({
    url: api.delete,
    method: "post",
    data: parameter
  });
}

/**
 * 报送总结
 */
export function submitWorkSummary(data) {
  return axios({
    url: api.submitWorkSummary,
    method: "post",
    data: data
  });
}

/**
 * 评阅总结
 */
export function readWorkSummary(data) {
  return axios({
    url: api.readWorkSummary,
    method: "post",
    data: data
  });
}